package com.jeect.productweb.service;

import com.jeect.base.domain.Product;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

//@FeignClient(value = "product",fallback = ProductServiceImpl.class)
public interface ProductService{
//    @GetMapping("/product/{sku}")
//    @Cacheable(value = "products",key = "#sku",condition="#result!=null")
//    public Product getBySku(@PathVariable(name = "sku") String sku);

    Product getFromLocalCacheBySku(String sku);

    Product getBySku(String sku);
}